/*
 * @Author: 鏉滀簩搴� 3224811364@qq.com
 * @Date: 2024-06-28 11:05:46
 * @LastEditors: 鏉滀簩搴� 3224811364@qq.com
 * @LastEditTime: 2024-07-16 14:56:41
 * @FilePath: src/layouts/QuestionLayout.tsx
 * @Description: 这是默认设置,可以在设置》工具》File Description中进行配置
 */
import React, {FC} from 'react';
import {Outlet} from "react-router-dom";
import useLoadUserData from "../hooks/useLoadUserData";
import {Spin} from "antd";
import useNavPage from "../hooks/useNavPage";

// 问卷详情

const QuestionLayout: FC = () => {
  const {waitingUser} = useLoadUserData()
  useNavPage(waitingUser)
  return (
    <div>
      {/*<div>QuestionLayout</div>*/}
      <div> {waitingUser ? <div style={{textAlign: 'center', marginTop: '60px'}}>
        <Spin/>
      </div> : <Outlet/>}</div>
    </div>
  );
};

export default QuestionLayout;
